import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
import homeChild from '../views/home/index';
// console.log(homeChild);
const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/index',
    children:[ // 使用扩展运算符
      ...homeChild
    ]
  },
  {
    path: '/people',
    name: 'People',
    component: () => import(/* webpackChunkName: "about" */ '../views/secenedPage/people.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
